package org.jprogger.myworld.api.app;


/**
 * Application context
 * Initialize for first time call Api Services
 * 
 * @author jprogger
 *
 */
public class AppContext {

	private static AppContext instance;
	
	private ApiParams apiParams;
	private InitAppParams appParams;
	
	private AppContext(ApiParams apiParams, InitAppParams appParams) {
		this.apiParams = apiParams;
		this.appParams = appParams;
	}
	
	public synchronized static void initContext(InitAppParams appParams, ApiParams apiParams) {
		instance = new AppContext(apiParams, appParams);
	}

	public static AppContext getInstance() {
		return instance;
	}
	
	public ApiParams getApiParams() {
		return apiParams;
	}
	
	public InitAppParams getAppParams() {
		return appParams;
	}
}
